# coding: utf8
import pika

from vnpy_ctp.config import config

PIKA_CONF = config.get_config()['MQ']

credentials = pika.PlainCredentials(PIKA_CONF['user'], PIKA_CONF['password'])
connection = pika.BlockingConnection(pika.ConnectionParameters(host=PIKA_CONF['host'],
                                                               port=PIKA_CONF['port'],
                                                               credentials=credentials))
channel = connection.channel()
